# # -*- coding: utf-8 -*-
# # @Author  : haomh
# # @Time    : 2025/11/3 14:17
# # @Function:
#
# '''
# 1.使用列表推导式生成能被5整除的数（100以内）
# '''
#
# # list = [x for x in range(0, 100, 5)]
# #
# # print(list)
#
# '''
# 2.有两个列表，一个是学生姓名，一个是学生的年龄，生成一个字典，key为姓名，value为年龄
# list1 = ["小明","小红"]
# list2 = [18,19]
# {"小明":18,"小红":19}
# '''
# #
# # list1 = ["小明", "小红"]
# # list2 = [18, 19]
# #
# # # 生成字典：key为姓名，value为年龄
# # dict1 = {name: age for name, age in zip(list1, list2)}
# #
# # print(dict1)
# #
# # list1 = ['小明', '小红']
# # list2 = [18, 19]
# # dict1 = {name: age for name, age in zip(list1, list2)}
# # print(dict1)
# '''
# 用 zip 处理三个列表 a = [1,2,3]、b = [4,5,6]、c = [7,8,9]，
# 写出 zip(a,b,c) 生成的迭代器内容（用元组列表表示）。
# '''
# a = [1, 2, 3]
# b = [4, 5, 6]
# c = [7, 8, 9]
#
# dict = {a: b for a, b in zip(a, b)}
#
# A, B, C = dict
#
#
#
# def func1():
#
# '''
# 注册系统
# 页面：
# [{name:xxx,age:xxx},{name:xxx,age:xxx},{name:xxx,age:xxx}]
# ----------------
#
# *   1-新增用户
# *   2-查询单个用户信息
# *   3-查询全部用户信息
# *   4-删除用户
# ----------------
# 功能1：新增学生信息（姓名和年龄）通过键盘，如果学生已经存在提示用户已存在
# 功能2：查询学生信息
# 功能3：删除学生信息
# '''
#
# # stu_dict = {}
# #
# #
# # # 新增用户
# # def add_stu(name, age):
# #     if name in stu_dict:
# #         print('学生已存在，请重新输入')
# #     else:
# #         stu_dict[name] = age
# #         print(f'学生：{name}已添加')
# #
# #
# # def query_stu():
# #     print(f'全部学生信息如下：{stu_dict}')
# #
# #
# # def query_stu_byone(name):
# #     if name in stu_dict:
# #         print(f'学生姓名为{name},年龄为{stu_dict[name]}')
# #     else:
# #         print(f'未查询到学生：{name}信息')
# #
# #
# # def del_stu(name):
# #     if name in stu_dict:
# #         del stu_dict[name]
# #         print(f'学生：{name}删除成功')
# #     else:
# #         print(f'未查找到学生：{name}信息')
# #
# #
# # while True:
# #     print(stu_dict)
# #     print('1-新增用户/n', '2-查询单个用户信息/n', '3-查询全部用户信息/n', '4-删除用户/n', '5-退出系统')
# #     choose = input(f'请输入您的需求对应的数字')
# #     if choose == '5':
# #         print('感谢使用本系统')
# #         break
# #     if choose == '1':
# #         name = input('请输入学生姓名')
# #         age = input('请输入学生年龄')
# #         add_stu(name, age)
# #         continue
# #     if choose == '2':
# #         name = input('请输入学生姓名')
# #         query_stu_byone(name)
# #         continue
# #     if choose == '3':
# #         query_stu()
# #         continue
# #     if choose == '4':
# #         name = input('请输入要删除的学生姓名')
# #         del_stu(name)
# #         continue
#
